package com.gxa.customer.controller;

import com.gxa.common.commons.R;
import com.gxa.common.params.HousePaymentStatusUpdateParam;
import com.gxa.common.params.QueryHousePaymentStatusParam;
import com.gxa.customer.service.HousePaymentStatusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/customer/housePaymentStatus")
public class HousePaymentStatusController {
    @Autowired
    private HousePaymentStatusService housePaymentStatusService;

    /**
     * 编辑房款及第三方支付状态（完成支付后，修改是否支付尾款&添加付完尾款日期）
     * @param param
     * @return
     */
    @PostMapping("/updateHousePaymentStatus")
    public R updateHousePaymentStatus(@RequestBody HousePaymentStatusUpdateParam param){
        return housePaymentStatusService.updateHousePaymentStatus(param);
    };

    /**
     * 查询房款支付状态
     * @param param
     * @return
     */
    @PostMapping("/queryHousePaymentStatus")
    public R queryHousePaymentStatus(@RequestBody QueryHousePaymentStatusParam param){
        return housePaymentStatusService.queryHousePaymentStatus(param);
    };
}
